
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Welcome</title>
<link href="../guides/login.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/jquery-1.8.3.js"></script>
<script language="javascript" src="../js/md5.js"></script>
<script language="javascript">
function changeimg(){
    $("#imgcode").attr('src',"../imgcode.php?act=init&"+Math.random());
}
$(function(){
    $("#code").focus(function(){
	    $("#imgcode").attr('src',"../imgcode.php?act=init&"+Math.random());
		$("#imgcode").show();
	});
	//$("input.sub").click(function(){checkform();});
	$("#username").focus();
/*	$("#username").keyup(function(){
	     $("#username").val($("#username").val().toUpperCase());
	});*/
	$("input:password").click(function(){
	     $(this).attr("placeholder","");
	});
	$("#password").blur(function(){
		 if($(this).val()==''){
	       $(this).attr("placeholder",$(this).attr("title"));
		 }else{
	       $("#pass").val(men_md5_password($("#password").val()));	
		 }
	});
	$("input:text").click(function(){
	     $(this).attr("placeholder","");
	});
	$("input:text").blur(function(){
		if($(this).val()==''){
	      $(this).attr("placeholder",$(this).attr("title"));
		}
	});
	$("#username").focus(function(){
	    $("#imgcode").hide();
		$("#code").val('');
	});
});

function checkform(){
    if($("#username").val()==''){
	     alert("請輸入帳號");
		 $("#username").focus();
		 return false;
	}else if($("#password").val()==''){
	     alert("請輸入密碼");
		 $("#password").focus();
		 return false;
	}else if($("#code").val()==''){
	     alert("請輸入驗證碼");
		 $("#code").focus();
		 return false;
	}else{
		return true;
	}
}

function stop(){
   return false;
}

function hideinfo(){ if(event.srcElement.tagName=="A"){
   window.status=event.srcElement.innerText}
}
document.onmouseover=hideinfo; 
document.onmousemove=hideinfo;
	

</script> 

</head>
<body>
<div class="header"></div>
<div class="main">
<div class="panel">
<div class="login">
<FORM  method='post' id='form' name="form" onSubmit="return checkform();" > <input type="hidden" name='pass' id='pass' value="" /><input type="hidden" name="xtype" value="login" />
<div class="info username"><label>账号</label><input type="text" name="username" id="username" title="请输入您的账号"  placeholder="请输入您的账号" /></div>
<div class="info password"><label>密码</label><input type="password" name="password"  id="password"  title="您的密码"  placeholder="您的密码" /></div>
<div class="info code"><label>验证码</label><input type="text" name="code" id='code'  autocomplete="off" title="验证码"  placeholder="验证码" /><img  onClick="changeimg()" id=imgcode /></div>
<div class="control"><input type="submit" value="登录" ></div>
</form>
</div>
</div>
</div>
</body>
</html>